
package example.customer.repository.impl;

import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import example.customer.Customer;
import example.customer.repository.CustomerRepository;

/**
 * Description : 
 * @author
 * @since
 * @version
 * @see
 *
 * <pre>
 * << Modification Information >>
 *   
 *   Date     Modifier               Expression
 *  -------    --------    ---------------------------
 *  
 *
 * 
 * </pre>
 */

@Repository
public class CustomerHibernateDao implements CustomerRepository
{
	@Autowired
	private SessionFactory sessionFactory;
	
	@SuppressWarnings("unchecked")
	@Override
	public List<Customer> getAllCustomers() {
		return sessionFactory.getCurrentSession().createQuery("from Customer").list();
	}

	@Override
	public Customer addCustomer(Customer customer) {
		// TODO Auto-generated method stub
		return null;
	}
}